From 0ee8b051c502f0bcf67bb27875527c7a90b628df Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Fri, 19 Apr 2024 21:00:29 -0700
Subject: feat(badges): admin panel

---
 src/routes/user/[user]/badges/+page.svelte | 11 +++++++++++
 1 file changed, 11 insertions(+)

(limited to 'src/routes/user/[user]/badges/+page.svelte')

diff --git a/src/routes/user/[user]/badges/+page.svelte b/src/routes/user/[user]/badges/+page.svelte
index a1ac68a5..817173bc 100644
--- a/src/routes/user/[user]/badges/+page.svelte
+++ b/src/routes/user/[user]/badges/+page.svelte
@@ -27,6 +27,8 @@
 	import Tooltip from '$lib/Tooltip/LinkedTooltip.svelte';
 	import BadgePreview from '$lib/BadgeWall/BadgePreview.svelte';
 	import { thumbnail } from '$lib/Utility/image.js';
+	import authorisedJson from '$lib/Data/Static/authorised.json';
+	import identity from '$stores/identity';
 
 	export let data;
 
@@ -58,6 +60,7 @@
 	let migrateMode = false;
 	let hideMode = false;
 	let preferences: UserPreferences;
+	const authorised = authorisedJson.includes($identity.id);
 
 	$: categoryFilter = new URLSearchParams($page.url.searchParams).get('category');
 
@@ -520,6 +523,14 @@
 								groupBadges(removeHiddenBadges(isOwner, ungroupedBadges))
 							)}
 
+							{#if authorised}
+								<div class="card">
+									<button>Shadow Hide Badges</button>
+								</div>
+
+								<p />
+							{/if}
+
 							{#if isOwner}
 								<div class="card">
 									<b>Notice:</b> AniList has begun purging outbound links which contain AI-generated
-- 
cgit v1.2.3

